Bugs?: If you find a problem with this file, use the Apple Bug Reporter
stack. Include the file and version information (from above)
in the problem description and send to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __DISPLAYS__
#define __DISPLAYS__
#ifndef __CONDITIONALMACROS__
#include <ConditionalMacros.h>
#endif
#ifndef __COMPONENTS__
#include <Components.h>
#endif
/* #include <Types.h> */
/* #include <MixedMode.h> */
#ifndef __VIDEO__
#include <Video.h>
#endif
/* #include <Quickdraw.h> */
/* #include <QuickdrawText.h> */
#ifndef __APPLEEVENTS__
#include <AppleEvents.h>
#endif
/* #include <Errors.h> */
/* #include <Memory.h> */
/* #include <OSUtils.h> */
/* #include <Events.h> */
/* #include <EPPC.h> */
/* #include <AppleTalk.h> */
/* #include <Files.h> */
/* #include <PPCToolbox.h> */
/* #include <Processes.h> */
/* #include <Notification.h> */
#ifndef __WINDOWS__
#include <Windows.h>
#endif
/* #include <Controls.h> */
/* #include <Menus.h> */
#ifndef __EVENTS__
#include <Events.h>
#endif
#ifndef __PROCESSES__
#include <Processes.h>
#endif
#ifndef __DIALOGS__
#include <Dialogs.h>
#endif
/* #include <TextEdit.h> */
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
enum {
/* AppleEvents Core Suite */
kAESystemConfigNotice = 'cnfg',
/* Core Suite types */
kAEDisplayNotice = 'dspl',
kAEDisplaySummary = 'dsum',
keyDMConfigVersion = 'dmcv',
keyDMConfigFlags = 'dmcf',
keyDMConfigReserved = 'dmcr',
keyDisplayID = 'dmid',
keyDisplayComponent = 'dmdc',
keyDisplayDevice = 'dmdd',
keyDisplayFlags = 'dmdf',
keyDisplayMode = 'dmdm',
keyDisplayModeReserved = 'dmmr',
keyDisplayReserved = 'dmdr',
keyDisplayMirroredId = 'dmmi',
keyDeviceFlags = 'dddf',
keyDeviceDepthMode = 'dddm',
keyDeviceRect = 'dddr',
keyPixMapRect = 'dpdr',
keyPixMapHResolution = 'dphr',
keyPixMapVResolution = 'dpvr',
keyPixMapPixelType = 'dppt',
keyPixMapPixelSize = 'dpps',
keyPixMapCmpCount = 'dpcc',
keyPixMapCmpSize = 'dpcs',
keyPixMapAlignment = 'dppa',
keyPixMapResReserved = 'dprr',
keyPixMapReserved = 'dppr',
keyPixMapColorTableSeed = 'dpct',
keySummaryMenubar = 'dsmb',
keySummaryChanges = 'dsch',
keyDisplayOldConfig = 'dold',
keyDisplayNewConfig = 'dnew'
};
enum {
dmOnlyActiveDisplays = true,
dmAllDisplays = false
};
enum {
/* Switch Flags */
kNoSwitchConfirmBit = 0, /* Flag indicating that there is no need to confirm a switch to this mode */
kDepthNotAvailableBit, /* Current depth not available in new mode */
kShowModeBit = 3, /* Show this mode even though it requires a confirm. */
kModeNotResizeBit = 4 /* Do not use this mode to resize display (for cards that mode drives a different connector). */
};
enum {
/* Summary Change Flags (sticky bits indicating an operation was performed)
For example, moving a display then moving it back will still set the kMovedDisplayBit.
*/
kBeginEndConfigureBit = 0,
kMovedDisplayBit,
kSetMainDisplayBit,
kSetDisplayModeBit,
kAddDisplayBit,
kRemoveDisplayBit,
kNewDisplayBit,
kDisposeDisplayBit,
kEnabledDisplayBit,
kDisabledDisplayBit,
kMirrorDisplayBit,
kUnMirrorDisplayBit
};
enum {
/* Power Mode constants for AVPowerStateRec.powerState. */
kAVPowerOff,
kAVPowerStandby,
kAVPowerSuspend,
kAVPowerOn
};
enum {
/* Notification Messages for extended call back routines */
kDMNotifyInstalled = 1, /* At install time */
kDMNotifyEvent = 2, /* Post change time */
kDMNotifyRemoved = 3, /* At remove time */
kDMNotifyPrep = 4, /* Pre change time */
kDMNotifyExtendEvent = 5, /* Allow registrees to extend apple event before it is sent */
kDMNotifyDependents = 6, /* Minor notification check without full update */
/* Notification Flags */
kExtendedNotificationProc = (1L << 16)
};
/* types for notifyType */
enum {
kFullNotify, /* This is the appleevent whole nine yards notify */
kFullDependencyNotify /* Only sends to those who want to know about interrelated functionality (used for updating UI) */
};
/* DisplayID/DeviceID constants */
enum {
kDummyDeviceID = 0x0FF, /* This is the ID of the dummy display, used when the last “real” display is disabled.*/
kInvalidDisplayID = 0x000, /* This is the invalid ID*/
kFirstDisplayID = 0x100
};
enum {
/* bits for panelListFlags */
kAllowDuplicatesBit = 0
};
/* Constants for fidelity checks */
enum {
kNoFidelity = 0,
kMinimumFidelity = 1,
kDefaultFidelity = 500, /* I'm just picking a number for Apple default panels and engines*/
kDefaultManufacturerFidelity = 1000 /* I'm just picking a number for Manufacturer's panels and engines (overrides apple defaults)*/
};
enum {
kAnyPanelType = 0, /* Pass to DMNewEngineList for list of all panels (as opposed to specific types)*/
kAnyEngineType = 0, /* Pass to DMNewEngineList for list of all engines*/
kAnyDeviceType = 0, /* Pass to DMNewDeviceList for list of all devices*/
kAnyPortType = 0 /* Pass to DMNewDevicePortList for list of all devices*/
};
/* portListFlags for DM_NewDevicePortList */
enum {
/* Should offline devices be put into the port list (such as dummy display) */
kPLIncludeOfflineDevicesBit = 0
};
typedef unsigned long DMFidelityType;
/* AVID is an ID for ports and devices the old DisplayID type
is carried on for compatibility
*/
typedef unsigned long AVIDType;
typedef AVIDType DisplayIDType;
typedef void *DMListType;
typedef unsigned long DMListIndexType;
struct AVPowerStateRec {
unsigned long powerState;
unsigned long powerFlags;
unsigned long powerReserved1;
unsigned long powerReserved2;
};
typedef struct AVPowerStateRec AVPowerStateRec;
typedef AVPowerStateRec *AVPowerStatePtr;
struct DMComponentListEntryRec {
DisplayIDType itemID; /* DisplayID Manager*/
Component itemComponent; /* Component Manager*/
ComponentDescription itemDescription; /* We can always construct this if we use something beyond the compontent mgr.*/
ResType itemClass; /* Class of group to put this panel (eg geometry/color/etc for panels, brightness/contrast for engines, video out/sound/etc for devices)*/
DMFidelityType itemFidelity; /* How good is this item for the specified search?*/
unsigned long itemFlags; /* Set to 0 (future expansion)*/
ResType itemReserved; /* What kind of code does the itemReference point to (right now - kPanelEntryTypeComponentMgr only)*/
unsigned long itemFuture; /* Set to 0 (future expansion - probably an alternate code style)*/
extern pascal OSErr DMAddDisplay(GDHandle newDevice, short driver, unsigned long mode, unsigned long reserved, unsigned long displayID, Component displayComponent, Handle displayState)
THREEWORDINLINE(0x303C, 0x0D08, 0xABEB);
extern pascal OSErr DMMoveDisplay(GDHandle moveDevice, short x, short y, Handle displayState)
extern pascal OSErr DMSetDisplayMode(GDHandle theDevice, unsigned long mode, unsigned long *depthMode, unsigned long reserved, Handle displayState)
THREEWORDINLINE(0x303C, 0x0A11, 0xABEB);
extern pascal OSErr DMCheckDisplayMode(GDHandle theDevice, unsigned long mode, unsigned long depthMode, unsigned long *switchFlags, unsigned long reserved, Boolean *modeOk)